package cn.liip.action;

import java.util.Map;

import org.apache.struts2.interceptor.SessionAware;

import cn.liip.beans.User;

public class LoginAction extends BaseAction implements SessionAware {

	Map<String, Object> session;
	private User user;

	public String login() {
		if (user.getName().equals("1") && user.getPassword().equals("1")) {
			return "success";
		} else {
			return "loginError";
		}
	}

	@Override
	public void setSession(Map<String, Object> session) {
		this.session = session;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

}
